<?php
namespace Home\Model;
use Think\Model;
class DepotModel extends Model {
	public $page; //当前页
	public $perpage; //每页显示
	public $brand_id; //ID
	public $post; //提交的信息 数组
	public $table='zjy_depot';
	public $ids; //IDs 数组，用于删除

	//获取列表
	public function get_depot_list()
	{
		$Model=M("Depot");
		//$list=$Model->field('depot_id,depot_name')->where('depot_show=1')->order('depot_sort asc,depot_id desc')->select();
		$sql="select a.depot_id,a.depot_name,b.area_name from zjy_depot as a left join zjy_area as b on a.depot_area_id=b.area_id WHERE depot_show=1 ORDER BY depot_sort asc,depot_id desc";
		$list=$Model->query($sql);
		return $list;
	}

}